package com.example.a05;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import androidx.appcompat.app.AppCompatActivity;

public class LinearLayout extends AppCompatActivity {
    Button btnReturn;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_linear_layout);

        LinearLayout.this.setTitle("布局管理-线性布局");

        btnReturn = findViewById(R.id.btnReturnHome);
        btnReturn.setOnClickListener(new mClick());
    }

    private class mClick implements View.OnClickListener {
        @Override
        public void onClick(View view) {
            if (view == btnReturn)
                startActivity(new Intent(LinearLayout.this, MainActivity.class));
        }
    }
}